// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: donggu
#pragma once

#include "coin2/exchange/base/executor/archive_executor.h"

namespace coin2::exchange::base::executor {
namespace impl {

using ::coin2::exchange::base::executor::ArchiveSyncExecutor;

class ArchiveMixin : public ISyncActor {
 public:
  explicit ArchiveMixin(ArchiveSyncExecutor* archive_executor)
      : archive_executor_(archive_executor) {
    archive_executor->RegisterSubsystem(this);
  }
  virtual int64_t PeekTimestamp() = 0;
  virtual void ConsumeRecord() = 0;

 protected:
  ArchiveSyncExecutor* archive_executor_;
};

}  // namespace impl
using impl::ArchiveMixin;
}  // namespace coin2::exchange::base::executor
